<%@ page contentType="text/html; charset=UTF-8"  %>

<!DOCTYPE html>
<html>
<head>
<title>序列添加</title>
    <%@ include file="/common/meta.jsp" %>
	<%@ include file="/common/import.jsp" %>
	<script type="text/javascript" src="${ctx}/js/easyui/extendvalidate.js"></script>
<script type="text/javascript">
	var inputForm = '#inputForm';
	$(function(){
		$(inputForm).form({
		    success:function(data){
		    	var result = jQuery.parseJSON(data);
		    	if(result.flag=='T'){
		    		$.messager.confirm('提交结果', '操作成功', function(){
						parent.colseAdd();// 关闭添加窗口
		    			parent.cateReload();// 刷新列表
					});
		    	}else if(result.flag=='F'){
		    		$.messager.alert('提交结果', result.msg, 'info');
		    	}else{
		    		$.messager.alert('提交结果', '操作失败', 'error');
		    	}        
		    },
		    error:function(messg)  { 
	       	    $.messager.alert('错误提示', messg.responseText, 'error');
	       }  
		});
		$('#beanId').focus();
	});
	
	function doSubmit(){
		var flag = $(inputForm).form('validate');
		if(flag){
			//ZBXTools.showProcess('正在提交数据...');
			$(inputForm).submit();
		}
	}
</script>
</head>
<body>	
<div id="tip"> </div>
		<form id="inputForm" name="inputForm" method="post" action="${ctx}/seq/core/save.action">
			<input type="hidden" name="formToken" id="formToken" value="${formToken}"/>
			<input type="hidden" name="isAdd" id="isAdd" value="${isAdd}"/>
			<table class="datagrid-body">
					<tr>
						<td>
							英文名<font color="red">*</font>
						</td>
						<td>
							<input class="easyui-validatebox" type="text" id="seqEname"	name="seqEname" value="${item.seqEname}"
								<c:if test="${item.seqEname != null}"> readonly="readonly"</c:if>
								onKeyup="noCN('seqEname')" onblur="noCN('seqEname');" required="true">
						</td>
					</tr>
					<tr>
						<td>
							中文名<font color="red">*</font>
						</td>
						<td>
							<input class="easyui-validatebox" type="text" id="seqCname"
								name="seqCname" value="${item.seqCname}" required="true">
						</td>
					</tr>
					<tr>
						<td>
							开始值<font color="red">*</font>
						</td>
						<td>
							<input class="easyui-numberbox" precision="0" type="text"
								id="startValue" name="startValue" value="${item.startValue}"
								required="true">
						</td>
					</tr>
					<tr>
						<td>
							增长值<font color="red">*</font>
						</td>
						<td>
							<input class="easyui-numberbox" precision="0" type="text"
								id="stepValue" name="stepValue" value="${item.stepValue}"
								required="true">
						</td>
					</tr>
					<tr>
						<td>
							当前值
						</td>
						<td>
							<input class="easyui-numberbox" precision="0" type="text"
								id="nextValue" name="nextValue" value="${item.nextValue}"
								required="true">
							<font color="red">如果您的SEQ已经开始使用了，请谨慎修改此值！</font>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<a href="#" onclick="doSubmit();" class="easyui-linkbutton" iconCls="icon-save">提交</a>
						</td>
					</tr>
				</table>
		</form>

</body>
</html>
